// pages/venue_qr/venue_qr.js
var app = getApp()
Page({

  data: {
    a_src: ''
  },

  onLoad: function (options) {
    this.getCodeByA()
  },
  // 获取C模式下的二维码
  getCodeByA: function () {
    var that = this,
      url = app.url + 'weiapp/Api/getwxacode&PHPSESSID=' + wx.getStorageSync('PHPSESSID');
    wx.request({
      url: url,
      data: { type: 'A', param: { path: 'pages/guide/guide?uid=' + wx.getStorageSync('uid'), width: 400 } ,flag_bg:true },
      success: function (res) {
        if (res.data.status == 0) {
          that.showError(res.data.msg)
        } else {
          that.setData({ 'a_src': res.data.url })
        }
      }
    })
  }
})